import java.io.*;
import java.util.Scanner;

/*
 ID: ning yusui
 LANG: JAVA
 TASK: humble
 */

public class humble {
    Scanner in;
    PrintWriter out;
    private int[] prime;
    private int[] humbles;
    private int[] index;

    public humble() throws IOException {
        in = new Scanner(new File(this.getClass().getName() + ".in"));
        out = new PrintWriter(new BufferedWriter(new FileWriter(this.getClass().getName() +
                ".out")));
    }

    private void work() {
        int k = in.nextInt();
        int n = in.nextInt();
        prime = new int[k];
        for (int i = 0; i < prime.length; i++) {
            prime[i] = in.nextInt();
        }
        index = new int[k];
        humbles = new int[n + 1];
        humbles[0] = 1;
        for (int i = 1; i <= n; i++) {
            humbles[i]= calcNextHumble(k, i);
        }
        out.println(humbles[humbles.length-1]);
        out.flush();
        out.close();
    }

    private int calcNextHumble(int k, int i) {
        int nextHumble = Integer.MAX_VALUE;
        for (int j = 0; j < k; j++) {
            for (; humbles[index[j]] * prime[j] <= humbles[i - 1]; index[j]++) ;
            if (nextHumble > humbles[index[j]] * prime[j]) {
                nextHumble = humbles[index[j]] * prime[j];
            }
        }
        return nextHumble;
    }

    public static void main(String[] args) throws IOException {
        long start = System.currentTimeMillis();
        new humble().work();
        System.out.println(System.currentTimeMillis() - start + "ms");
    }
}
